﻿<Window x:Class="CECB.Member.V_MemberSearch_Window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="V_MemberSearch_Window" 
        xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
       
          WindowStartupLocation="CenterScreen"   Background="#AA000000" 
        AllowsTransparency="True" WindowStyle="None" WindowState="Maximized"
        mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Margin="100,50,0,0" Width="800" Height="650">

        <Rectangle Margin="74,0,65,114" Stroke="White" RadiusY="19.5" RadiusX="19.5" StrokeThickness="4">
            <Rectangle.Effect>
                <DropShadowEffect Direction="330" BlurRadius="24" ShadowDepth="13" />
            </Rectangle.Effect>
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0" />
                    <GradientStop Color="#FFA3A1A1" Offset="0.494" />
                    <GradientStop Color="#FF272121" Offset="0" />
                    <GradientStop Color="#FF272121" Offset="1" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Grid>
            <TextBlock Height="36" Name="textBlocka" Text="Member contact details" HorizontalAlignment="Left"  VerticalAlignment="Top" Foreground="White" FontSize="22" Width="434" Margin="96,20,0,0" />
        </Grid>
        <GroupBox Margin="90,70,82,128">
            <StackPanel Orientation="Vertical" Height="406">
                <StackPanel Orientation="Horizontal">

                    <TextBlock Height="23" Name="textBlock3" Text="Search Member" Margin="10,20,0,0" Foreground="White" FontSize="15" Width="183" />
                    <toolkit:AutoCompleteBox Name="MemberAutocompleteTextBox" Margin="110,20,0,0" Width="250" Height="30" ValueMemberPath="mem_name" FilterMode="Contains" ItemsSource="{Binding}" TabIndex="1" IsTabStop="True" SelectionChanged="ReferenceTextBox_SelectionChanged" FontSize="18" Background="#FFFFE8A6" Opacity="1" UseLayoutRounding="False" BorderBrush="#FFF8F8F8" BorderThickness="2">
                        <toolkit:AutoCompleteBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding Path=mem_name}" />


                                </StackPanel>
                            </DataTemplate>
                        </toolkit:AutoCompleteBox.ItemTemplate>
                    </toolkit:AutoCompleteBox>

                </StackPanel>
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <Label Canvas.Left="35" Canvas.Top="112" Content="Contact No" Height="28" Name="label2" Width="308" Foreground="White" FontSize="14" />
                        <Label Canvas.Left="336" Canvas.Top="112" Content="Email Address" Height="28" Name="label3" Width="171" Foreground="White" FontSize="14" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">

                        <ListBox x:Name="listBoxContacts" ScrollViewer.CanContentScroll="False" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Height="181" Background="#FFFFE8A6" Width="292" Canvas.Left="39" Canvas.Top="137" SelectionChanged="listBoxContacts_SelectionChanged">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <WrapPanel Background="#FF3E3832" MaxWidth="300" Width="300">
                                        <StackPanel Orientation="Horizontal" MaxWidth="300" MinHeight="40">
                                            <WrapPanel Orientation="Horizontal" MaxWidth="300">

                                                <Label Content="{Binding mem_contactNo}" Height="auto" Width="auto" Foreground="White" HorizontalAlignment="Right" FontSize="15" />
                                            </WrapPanel>
                                        </StackPanel>
                                    </WrapPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>

                        <ListBox Background="#FFFFE8A6"  Margin="10,0,0,0" Height="181" Name="listBoxEmail" ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden" Width="300" SelectionChanged="listBoxEmail_SelectionChanged">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <WrapPanel Background="#FF3E3832" MaxWidth="300" Width="300">
                                        <StackPanel MaxWidth="300" MinHeight="40" Orientation="Horizontal">
                                            <WrapPanel MaxWidth="300" Orientation="Horizontal">
                                                <!--<Label Content="{Binding Members.mem_name}" FontSize="15" Foreground="White" Height="auto" HorizontalAlignment="Left" Width="auto" />
                                            <Label Content="  =&gt;  " FontSize="15" Foreground="White" Height="auto" HorizontalAlignment="Right" Width="auto" />-->
                                                <Label Content="{Binding mem_email}" FontSize="15" Foreground="White" Height="auto" HorizontalAlignment="Right" Width="auto" Target="{Binding}" SourceUpdated="Label_SourceUpdated" />
                                            </WrapPanel>
                                        </StackPanel>
                                    </WrapPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>

                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,20,0,0">
                        <Label Canvas.Left="70" Canvas.Top="341" Content=" " Height="28" Name="label_Change" Width="305" Foreground="White" />
                        <TextBox Grid.Column="2" Width="300" Height="35" Name="textBoxUpdateContact" FontSize="18" Background="#FFFFE8A6" Opacity="1" Canvas.Left="337" Canvas.Top="339" PreviewTextInput="textBoxUpdateContact_PreviewTextInput" TextChanged="textBoxUpdateContact_TextChanged" />
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button Background="{x:Null}" BorderBrush="White" Click="button1_Click" Height="44"   Name="button1" Margin="510,20,0,0" Width="98">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Column="0" Height="32" Margin="2" Source="/CECB;component/images/Save.png" Width="32" />
                            <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                                <TextBlock Margin="0" Padding="0" Foreground="White" Text="Update" TextWrapping="NoWrap" />
                            </StackPanel>
                        </Grid>
                    </Button>

                </StackPanel>
            </StackPanel>

        </GroupBox>
            <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,12,80,0" Canvas.Left="603" Canvas.Top="-61">
            <Image Height="32" Margin="2" Source="/CECB;component/images/closeblack.png"  Width="32" MouseLeftButtonDown="Image_MouseLeftButtonDown" />
        </Grid>


    </Grid>
</Window>
